home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 41
/
Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso
/
-seriously_amiga-
/
graphics
/
ifx_antique
/
antique_ppc.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-04-19
|
1KB
|
56 lines
#include <stdio.h>
#include <exec/types.h>
#include <exec/nodes.h>
#include <exec/lists.h>
#include <exec/memory.h>
#include <utility/tagitem.h>
#include <powerup/ppclib/interface.h>
#include <powerup/ppclib/message.h>
#include <powerup/ppclib/tasks.h>
#include <powerup/gcclib/powerup_protos.h>
struct StartupData
{
ULONG MsgCount;
};
int main(void)
{
struct StartupData *StartupData;
void *PPCPort;
void *M68kMsg;
ULONG MsgCount;
ULONG i,j;
ULONG *Body;
ULONG w,le;
UBYTE *b,*g;
StartupData =(struct StartupData *) PPCGetTaskAttr(PPCTASKTAG_STARTUP_MSGDATA);
MsgCount = StartupData->MsgCount;
if (PPCPort=(void*) PPCGetTaskAttr(PPCTASKTAG_MSGPORT))
{
for (i=0;i<MsgCount;i++)
{
PPCWaitPort(PPCPort);
if (M68kMsg = PPCGetMessage(PPCPort))
{
Body = (ULONG *)PPCGetMessageAttr(M68kMsg, PPCMSGTAG_DATA);
g = (UBYTE *)Body[0];
b = (UBYTE *)Body[1];
w = Body[2];
le = Body[3];
for(j=0;j<w;j++)
{
g[j+le] = ((int)g[j+le] * 215) >> 8;
b[j+le] = ((int)b[j+le] * 174) >> 8;
}
PPCReplyMessage(M68kMsg);
}
}
}
}